#pragma once
#include "qthread.h"
#include "qvumeter.h"
#include "qlcdnumber.h"
#include "qslider.h"
#include <time.h> 
#include "../AudioModel/AudioManager.h"
#include "QVisualizer.h"

using namespace AudioManager;

class RealTimeAnalysis: public QThread
{
	Q_OBJECT
public:
	RealTimeAnalysis(int track_id,QVUMeter *meter, Manager *aManager,int startTime,QVisualizer *visu);
	~RealTimeAnalysis(void);
	void run();
private:
	Manager *aManager;
	QVUMeter *meter;
	QLCDNumber *sBar;

	int startTime;
	int track_id;
	clock_t start_clock, end;
	double elapsed;
	QVisualizer *visu;
signals:
	void updateLeftValue(double);
	void updateRightValue(double);
};

